package com.ruoyi.guarantee.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.guarantee.mapper.BAgreementLogMapper;
import com.ruoyi.guarantee.domain.BAgreementLog;
import com.ruoyi.guarantee.service.IBAgreementLogService;

/**
 * 履约修改记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-24
 */
@Service
public class BAgreementLogServiceImpl implements IBAgreementLogService
{
    @Autowired
    private BAgreementLogMapper bAgreementLogMapper;

    /**
     * 查询履约修改记录
     *
     * @param id 履约修改记录主键
     * @return 履约修改记录
     */
    @Override
    public BAgreementLog selectBAgreementLogById(Long id)
    {
        return bAgreementLogMapper.selectBAgreementLogById(id);
    }

    /**
     * 查询履约修改记录列表
     *
     * @param bAgreementLog 履约修改记录
     * @return 履约修改记录
     */
    @Override
    public List<BAgreementLog> selectBAgreementLogList(BAgreementLog bAgreementLog)
    {
        return bAgreementLogMapper.selectBAgreementLogList(bAgreementLog);
    }

    /**
     * 新增履约修改记录
     *
     * @param bAgreementLog 履约修改记录
     * @return 结果
     */
    @Override
    public int insertBAgreementLog(BAgreementLog bAgreementLog)
    {
        bAgreementLog.setCreateTime(DateUtils.getNowDate());
        return bAgreementLogMapper.insertBAgreementLog(bAgreementLog);
    }

    /**
     * 修改履约修改记录
     *
     * @param bAgreementLog 履约修改记录
     * @return 结果
     */
    @Override
    public int updateBAgreementLog(BAgreementLog bAgreementLog)
    {
        return bAgreementLogMapper.updateBAgreementLog(bAgreementLog);
    }

    /**
     * 批量删除履约修改记录
     *
     * @param ids 需要删除的履约修改记录主键
     * @return 结果
     */
    @Override
    public int deleteBAgreementLogByIds(Long[] ids)
    {
        return bAgreementLogMapper.deleteBAgreementLogByIds(ids);
    }

    /**
     * 删除履约修改记录信息
     *
     * @param id 履约修改记录主键
     * @return 结果
     */
    @Override
    public int deleteBAgreementLogById(Long id)
    {
        return bAgreementLogMapper.deleteBAgreementLogById(id);
    }
}
